
<header class="navbar navbar-expand-lg navbar-light bg-light border-bottom shadow-sm fixed-top" id="main-navbar"><a class="navbar-brand ml-lg-4 mx-auto" href="/">
    <notempty name="$theme_vars.brand_img"><img src="{$theme_vars.brand_img|cmf_get_image_url|default=''}" alt="{$theme_vars.brand|default=''}"/><else />
      <php>
        $var = empty($theme_vars['brand']) ? $site_info['site_name'] : $theme_vars['brand'];
        $siteName = explode('|',$var);
      </php>
      <volist name="siteName" id="v" key="k"><span class="brand-{$k}">{$v}</span></volist>
    </notempty></a>
  <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#mainNav" aria-controls="mainNav" aria-expanded="false" aria-label="Toggle navigation"><span class="navbar-toggler-icon"></span></button>
  <nav class="collapse navbar-collapse ml-lg-5" id="mainNav">
    <navigation class="navbar-nav mr-auto" nav-id="1" root="ul" id="" max-level="3">
      <php>
        $menu_item = $level > 1 ? 'dropdown-menu-item' : 'nav-item mx-lg-4';
        $dropdown_link = $level > 1 ? 'dropdown-item' : 'nav-link';
      </php>
      <navigationMenu class="{$menu_item}" root="li"><a class="{$dropdown_link}" href="{$menu.href|default=''}" target="{$menu.target|default=''}"><i class="fa mr-1 {$menu.icon|default='fa-book'}"></i><span>{$menu.name|default=''}</span></a></navigationMenu>
      <navigationFolder class="nav-item dropdown" root="li" dropdown="ul" dropdown-class="dropdown-menu"><a class="nav-link dropdown-toggle dropdown-toggle-{$level}" href="#" role="button" data-toggle="dropdown" aria-haspopup="false" aria-expanded="false"><i class="fa mr-1 {$menu.icon|default='fa-book'}"></i><span>{$menu.name}</span></a></navigationFolder>
    </navigation>
    <form class="form-inline my-2">
      <input class="form-control mr-2 w-auto" type="search" placeholder="点击搜索" aria-label="Search"/>
      <button class="btn btn-outline-secondary my-2 my-sm-0" type="submit">搜索</button>
    </form>
  </nav>
</header>